Generate introspection for GdkWayland API
authorEmmanuele Bassi <ebassi@gnome.org>
Mon, 12 Oct 2020 13:05:52 +0000 (14:05 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Mon, 12 Oct 2020 13:07:26 +0000 (14:07 +0100)
Like we do for GdkX11. We can't use all of the public C API, but we can
expose enough type information to allow non-C developers to actually
check if they are running the Wayland GDK backend or not—plus some
additional Wayland-specific API.

gtk/meson.build

index e29f0d4fdd597c7730a01c61fbfa159531b7ddff..006ac8f31e74bed6c65b31850aee9091a2276887 100644 (file)
@@ -1165,6 +1165,23 @@ if build_gir
     gtk_dep_sources += gdk_x11_gir
   endif
 
+  if wayland_enabled
+    gdk_wayland_gir = gnome.generate_gir(libgtk,
+                                         sources: gdk_wayland_public_headers + gdk_wayland_sources,
+                                         namespace: 'GdkWayland',
+                                         nsversion: gtk_api_version,
+                                         identifier_prefix: 'Gdk',
+                                         symbol_prefix: 'gdk',
+                                         export_packages: 'gtk4-wayland',
+                                         includes: [ gdk_gir[0], ],
+                                         install: true,
+                                         dependencies: gdk_gir_dep,
+                                         header: 'gdk/gdkwayland.h',
+                                         extra_args: gir_args,
+    )
+    gtk_dep_sources += gdk_wayland_gir
+  endif
+
   gsk_gir_inc = [ gdk_gir[0] ]
 
   gsk_gir = gnome.generate_gir(libgtk,